import Taro from "@tarojs/taro";
import {IFoodCateItem} from "../subPages/food/com/FoodItem";

export const OpenId: string = 'OpenId';
export const PreImgURI: string = 'PreImgURI';
export const SaveList: string = 'SaveList';

export function getStoreOpenId(): string {
  return Taro.getStorageSync(OpenId);
}

export function setStoreOpenId(data: string) {
  return Taro.setStorageSync(OpenId, data);
}

export function getStorePreImgUrI(): string {
  return Taro.getStorageSync(PreImgURI)
}

export function setStorePreImgUrI(data: string) {
  return Taro.setStorageSync(PreImgURI, data);
}

export function getStoreSaveList(): Array<IFoodCateItem> {
  return Taro.getStorageSync(SaveList);
}

export function setStoreSaveList(data: Array<IFoodCateItem>) {
  return Taro.setStorageSync(SaveList, data)
}
